package com.orientsec.autotest.project.system.sourcestruct.service;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.orientsec.autotest.project.system.sourcestruct.mapper.SourcestructMapper;
import com.orientsec.autotest.project.system.sourcestruct.domain.Sourcestruct;
import com.orientsec.autotest.project.system.sourcestruct.service.ISourcestructService;
import com.orientsec.autotest.common.utils.text.Convert;

/**
 * 数据源结构配置 服务层实现
 * 
 * @author autotest
 * @date 2019-12-30
 */
@Service
public class SourcestructServiceImpl implements ISourcestructService 
{
	@Autowired
	private SourcestructMapper sourcestructMapper;

	/**
     * 查询数据源结构配置信息
     * 
     * @param id 数据源结构配置ID
     * @return 数据源结构配置信息
     */
    @Override
	public Sourcestruct selectSourcestructById(Integer id)
	{
	    return sourcestructMapper.selectSourcestructById(id);
	}
	
	/**
     * 查询数据源结构配置列表
     * 
     * @param sourcestruct 数据源结构配置信息
     * @return 数据源结构配置集合
     */
	@Override
	public List<Sourcestruct> selectSourcestructList(Sourcestruct sourcestruct)
	{
	    return sourcestructMapper.selectSourcestructList(sourcestruct);
	}
	
    /**
     * 新增数据源结构配置
     * 
     * @param sourcestruct 数据源结构配置信息
     * @return 结果
     */
	@Override
	public int insertSourcestruct(Sourcestruct sourcestruct)
	{
	    return sourcestructMapper.insertSourcestruct(sourcestruct);
	}
	
	/**
     * 修改数据源结构配置
     * 
     * @param sourcestruct 数据源结构配置信息
     * @return 结果
     */
	@Override
	public int updateSourcestruct(Sourcestruct sourcestruct)
	{
	    return sourcestructMapper.updateSourcestruct(sourcestruct);
	}

	/**
     * 删除数据源结构配置对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteSourcestructByIds(String ids)
	{
		return sourcestructMapper.deleteSourcestructByIds(Convert.toStrArray(ids));
	}
	
}
